<cdk-virtual-scroll-viewport
  #scrollViewport
  scrollWindow
  [itemSize]="ixItemSize()"
  [minBufferPx]="ixMinBufferPx()"
  [maxBufferPx]="ixMaxBufferPx()"
>
  <ng-container *cdkVirtualFor="let item of nodes$ | async; let i = index; trackBy: innerTrackBy">
    <div (resized)="resized($event)">
      <ng-template ixTreeVirtualScrollNodeOutlet [data]="item"></ng-template>
    </div>
  </ng-container>
</cdk-virtual-scroll-viewport>

<ng-container treeNodeOutlet></ng-container>

@if (isScrollTopButtonVisible) {
  <button
    mat-icon-button
    class="scroll-top"
    ixTest="scroll-to-top"
    [matTooltip]="'Scroll to top' | translate"
    (click)="scrollToTop()"
  >
    <ix-icon name="mdi-arrow-up"></ix-icon>
  </button>
}
